<?php
namespace app\common\validate\member;
use think\Validate;
/**
 * 申请提现验证器
 */
class MemberWithdrawalValidate extends Validate
{
    // 验证规则
    protected $rule = [
        'ids' => ['require', 'array'],
        'id' => 'require',
        'is_disable' => ['require', 'in' => '0,1'],
        'amount'=> ['require', 'float', 'gt:0.01'],
        'auth_status' => ['require', 'in' => '1,2,3'],
        'code' => ['require'],
    ];
    // 错误信息
    protected $message = [
        'amount.require' => '请输入提现金额',
        'auth_status.require' => '请选择审核状态',
        'code.require' => '请选择提现方式',
    ];
    // 验证场景
    protected $scene = [
        'info'    =>  ['id'],
        'add'     =>  ['amount'],
        'edit'    =>  ['id', ],
        'dele'    =>  ['ids'],
        'disable' =>  ['ids', 'is_disable'],
        'auth' =>  ['ids', 'auth_status'],
        'withdrawalDownload' =>  ['ids', 'code'],
    ];
}
